package test1.shapes;

public class Vertebral {
     AbstractShape bottom;//抽象类前不用加public
     public double height;
     public Vertebral(double h)
    {
        height=h;
    }
    public void setBottom(AbstractShape bot)
    {
        bottom=bot;
    }
    public double getVolume()
    {
        return bottom.getArea()*height/3;
    }
}